package model.doe;

import java.awt.image.BufferedImage;

public class FresnelCrossed extends Fresnel
{
	private double doeWidth;
	private double doeHeight;
	private double doeStep;
	private double fh, fw, wl;
	private double maximumValueH, maximumValueW;

	public FresnelCrossed(double DoeHeight, double DoeWidth, double fh, double fw, double wl, double DoeStep)
	{
		this.doeStep = DoeStep;
		this.doeWidth = DoeWidth;
		this.doeHeight = DoeHeight;
		this.fw = fw;
		this.fh = fh;
		this.wl = wl;

		widthPointsNumber = (int) (doeWidth / doeStep);
		heightPointsNumber = (int) (doeHeight / doeStep);
		
		super.fresnel_crossed_init (DoeHeight/2 , fh, wl, DoeWidth/2, fw, wl );

	}
	
	@Override
	public double run(int i, int j) {
		double complAmpl = super.fresnel(doeStep * i)+ super.fresnel(doeStep * j);
		return complAmpl;
	}
}
